package com.xiaomi.eco.scheduler;

import com.xiaomi.cloud.plan.client.plan.PlanExecutor;
import com.xiaomi.cloud.plan.client.spring.annotation.PlanTask;
import com.xiaomi.eco.service.EcoMethodDimensionEntityService;
import com.xiaomi.eco.service.EcoServiceDimensionEntityService;
import com.xiaomi.eco.service.TaskService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;

@Slf4j
@PlanTask(name = "getEcoMethodMonitor", quartzCron = "0 0 2 ? * *", description = "每天凌2点晨计算解接口数据")
public class EcoMethodMonitorDataTask implements PlanExecutor {
    @Autowired
    private TaskService taskService;

    @Autowired
    EcoMethodDimensionEntityService ecoMethodDimensionEntityService;

    @Override
    public void execute() {
        ecoMethodDimensionEntityService.insertEcoService();
    }
}
